/*CodeBuilder v2.0.1 by 2022-04-27 22:54 */
using System;
using ASmile.ORM.Entitys;

namespace ASmile.DBModel
{
	public partial class Sys_Token : EntityBase
	{
		private System.String _Id;
		/// <summary>
		/// Id
		/// </summary>
		[Entity(CNId, 0, true, IsPrimaryKey = true)]
		public System.String Id
		{
			get { return _Id; }
			set
			{
				if (!OnPropertyChanged(CNId, _Id, value)) return;
				_Id = value;
				SetFieldChanged(CNId) ;
			}
		}

		private System.String _UserId;
		/// <summary>
		/// UserId
		/// </summary>
		[Entity(CNUserId, 1, true)]
		public System.String UserId
		{
			get { return _UserId; }
			set
			{
				if (!OnPropertyChanged(CNUserId, _UserId, value)) return;
				_UserId = value;
				SetFieldChanged(CNUserId) ;
			}
		}

		private System.String _TokenValue;
		/// <summary>
		/// TokenValue
		/// </summary>
		[Entity(CNTokenValue, 2, true)]
		public System.String TokenValue
		{
			get { return _TokenValue; }
			set
			{
				if (!OnPropertyChanged(CNTokenValue, _TokenValue, value)) return;
				_TokenValue = value;
				SetFieldChanged(CNTokenValue) ;
			}
		}

		private System.Int32 _TokenMode;
		/// <summary>
		/// token 模式，1: 黑名单模式，2：白名单
		/// </summary>
		[Entity(CNTokenMode, 3, true)]
		public System.Int32 TokenMode
		{
			get { return _TokenMode; }
			set
			{
				if (!OnPropertyChanged(CNTokenMode, _TokenMode, value)) return;
				_TokenMode = value;
				SetFieldChanged(CNTokenMode) ;
			}
		}

		private System.DateTime _ExpiresTime;
		/// <summary>
		/// ExpiresTime
		/// </summary>
		[Entity(CNExpiresTime, 4, true)]
		public System.DateTime ExpiresTime
		{
			get { return _ExpiresTime; }
			set
			{
				if (!OnPropertyChanged(CNExpiresTime, _ExpiresTime, value)) return;
				_ExpiresTime = value;
				SetFieldChanged(CNExpiresTime) ;
			}
		}

		private System.String _Remark;
		/// <summary>
		/// Remark
		/// </summary>
		[Entity(CNRemark, 5)]
		public System.String Remark
		{
			get { return _Remark; }
			set
			{
				if (!OnPropertyChanged(CNRemark, _Remark, value)) return;
				_Remark = value;
				SetFieldChanged(CNRemark) ;
			}
		}

		private System.DateTime _AddTime;
		/// <summary>
		/// AddTime
		/// </summary>
		[Entity(CNAddTime, 6, true)]
		public System.DateTime AddTime
		{
			get { return _AddTime; }
			set
			{
				if (!OnPropertyChanged(CNAddTime, _AddTime, value)) return;
				_AddTime = value;
				SetFieldChanged(CNAddTime) ;
			}
		}

		private System.String _AddHost;
		/// <summary>
		/// AddHost
		/// </summary>
		[Entity(CNAddHost, 7)]
		public System.String AddHost
		{
			get { return _AddHost; }
			set
			{
				if (!OnPropertyChanged(CNAddHost, _AddHost, value)) return;
				_AddHost = value;
				SetFieldChanged(CNAddHost) ;
			}
		}

		#region 字段名的定义
		public const string CNId = "Id";
		public const string CNUserId = "UserId";
		public const string CNTokenValue = "TokenValue";
		public const string CNTokenMode = "TokenMode";
		public const string CNExpiresTime = "ExpiresTime";
		public const string CNRemark = "Remark";
		public const string CNAddTime = "AddTime";
		public const string CNAddHost = "AddHost";
		#endregion

	}
}
